package com.example.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.function.Consumer;

@Configuration
public class StreamConsume {

    @Bean
    Consumer<String> produceMessage() {
        return msg -> {
            System.out.println("我是消费者"+msg);
        };
    }

}
